﻿using System.Collections.Generic;
using System.Runtime.Serialization;

[DataContract]
public partial class Rsvps
{
    [DataMember(Name="results")]
    public List<Rsvp> Items { get; set; }

    [DataMember]
    public object meta { get; set; }

    //public Rsvp GetRsvpForMember(string member_id)
    //{
    //    foreach (var rsvp in Items)
    //    {
    //        if (rsvp.member_id == member_id)
    //            return rsvp;
    //    }
    //    return new Rsvp();
    //}
}

public class MemberPhoto : Photo
{
   
}

[DataContract]
public class Rsvp
{
    [DataMember]
    public Member member { get; set; }
    [DataMember]
    public string response { get; set; }
    [DataMember]
    public MemberPhoto member_photo { get; set; }
    
    [DataMember(Name = "event")]
    public Event RsvpEvent { get; set; }
    [DataMember]
    public object mtime { get; set; }
    
    [DataMember(Name = "guests")]
    public int Guests { get; set; }
    [DataMember]
    public int rsvp_id { get; set; }
    public Group group { get; set; }

    [DataMember]
    public Venue venue { get; set; }

    [DataMember(Name = "comments")]
    public string Comments { get; set; }
}

//public partial class Rsvp
//{
//    public string id { get; set; }
//    public string photo_url { get; set; }
//    public string guests { get; set; }
//    public string event_id { get; set; }
//    public string member_id { get; set; }
//    public string response { get; set; }
//    public string name { get; set; }
//    public string comment { get; set; }
//    public string updated { get; set; }
//    public string created { get; set; }

//    public string PlusGuests
//    {
//        get
//        {
//            if (guests == "0") return "";
//            return "(+" + guests + ")";
//        }
//    }
//}
